# Create your views here.
from django.http import HttpResponse
from models import Minidb
from django.shortcuts import render_to_response

def getimg(request, img, ext):
    imglink = Minidb.objects.get(link=img).image
#    html = '<center><img src = "http://4pic.kz/upload/images/%s" /></center>' % imglink
#    return HttpResponse(html)
    return render_to_response('img.tpl', {'img_code': imglink})
def getimg2(request, img, ext, a):
    imglink = Minidb.objects.get(link=img).image
#    html = '<center><img src = "http://4pic.kz/upload/images/%s" /></center>' % imglink
#    return HttpResponse(html)
    return render_to_response('img.tpl', {'img_code': imglink})
